dynamic class com.c3d.mediaRotator.data.PanelModel extends Object
{
    var _panelStyles = new Array();
    var _panelSize = null;
    var _panelCorners: Number = 0;
    var _panelLocation = null;
    var _controller;
    var _panelAssetExtension;
    var _panelDelay;
    var _panelEffects;
    var _panelImageSrc;
    var _panelLabelText;
    var _panelLink;
    var _panelLinkTarget;
    var _panelStroke;
    var _panelSubviews;
    var _panelTabConfig;

    function PanelModel($panelController, $rawData)
    {
        super();
        this._controller = $panelController;
        this._panelEffects = new Array();
        if ($rawData.styles) 
        {
            if ($rawData.styles.effect) 
            {
                if ($rawData.styles.effect.attributes.type) 
                {
                    this._panelEffects.push($rawData.styles.effect.attributes);
                }
                else 
                {
                    for (var __reg8 in $rawData.styles.effect) 
                    {
                        this._panelEffects.push($rawData.styles.effect[__reg8].attributes);
                    }
                }
            }
            if ($rawData.styles.stroke) 
            {
                for (var __reg7 in $rawData.styles.stroke.attributes) 
                {
                    if ((__reg0 = __reg7) === "type") 
                    {
                        this._panelStroke[__reg7] = $rawData.styles.stroke.attributes[__reg7];
                    }
                    else if (__reg0 === "color") 
                    {
                        this._panelStroke[__reg7] = $rawData.styles.stroke.attributes[__reg7];
                    }
                    else if (__reg0 === "width") 
                    {
                        this._panelStroke[__reg7] = $rawData.styles.stroke.attributes[__reg7];
                    }
                }
            }
        }
        this._panelImageSrc = "/";
        this._panelLink = "/";
        this._panelLinkTarget = "_blank";
        this._panelDelay = 1000;
        this._panelLabelText = "test text";
        if ($rawData.attributes.image) 
        {
            this._panelImageSrc = $rawData.attributes.image;
            var __reg4 = this._panelImageSrc;
            var __reg9 = new Array();
            if (__reg4.indexOf("?") != -1) 
            {
                __reg4 = __reg4.substr(0, __reg4.indexOf("?") - 1);
            }
            __reg9 = __reg4.split(".");
            this._panelAssetExtension = __reg9[__reg9.length - 1];
        }
        if ($rawData.attributes.link) 
        {
            this._panelLink = $rawData.attributes.link;
        }
        if ($rawData.attributes.target) 
        {
            this._panelLinkTarget = $rawData.attributes.target;
        }
        if ($rawData.attributes.delay) 
        {
            this._panelDelay = $rawData.attributes.delay;
        }
        if ($rawData.attributes.tabLabel) 
        {
            this._panelLabelText = $rawData.attributes.tabLabel;
        }
        if ($rawData.tab) 
        {
            this._panelTabConfig = new Object();
            this._panelTabConfig.width = $rawData.tab.attributes.width;
            this._panelTabConfig.color = $rawData.tab.attributes.color;
            this._panelTabConfig.cornerradius = $rawData.tab.attributes.cornerradius.split(",");
            this._panelTabConfig.dimcolor = $rawData.tab.attributes.dimcolor;
            this._panelTabConfig.dimalpha = $rawData.tab.attributes.dimalpha;
            this._panelTabConfig.labelsize = $rawData.tab.attributes.labelsize;
            this._panelTabConfig.labelcolor = $rawData.tab.attributes.labelcolor;
            this._panelTabConfig.labeldimalpha = $rawData.tab.attributes.labeldimalpha;
        }
        if ($rawData.attributes.cornerradius) 
        {
            this._panelCorners = $rawData.attributes.cornerradius;
        }
        if ($rawData.attributes.height && $rawData.attributes.width) 
        {
            this._panelSize = new flash.geom.Point($rawData.attributes.width, $rawData.attributes.height);
        }
        if ($rawData.attributes.x && $rawData.attributes.y) 
        {
            this._panelLocation = new flash.geom.Point($rawData.attributes.x, $rawData.attributes.y);
        }
        this._panelSubviews = new Array();
        for (var __reg5 in $rawData) 
        {
        };
        if ($rawData.subviews) 
        {
            if ($rawData.subviews.subview.attributes) 
            {
                this._panelSubviews.push($rawData.subviews.subview);
            }
            else 
            {
                for (var __reg6 in $rawData.subviews.subview) 
                {
                    this._panelSubviews.push($rawData.subviews.subview[__reg6]);
                }
            }
            return;
        }
    }

    function initialize()
    {
    }

    function set controller($pc)
    {
        this._controller = $pc;
    }

    function get imageSrc()
    {
        return this._panelImageSrc;
    }

    function get label()
    {
        return this._panelLabelText;
    }

    function get subviews()
    {
        var __reg2 = new Array();
        __reg2 = this._panelSubviews.concat();
        return __reg2;
    }

    function get panelSize()
    {
        return this._panelSize;
    }

    function get panelCorners()
    {
        return this._panelCorners;
    }

    function get panelLocation()
    {
        return this._panelLocation;
    }

    function get panelEffects()
    {
        return this._panelEffects;
    }

    function get linkInfo()
    {
        var __reg2 = new Object();
        if (this._panelLink) 
        {
            __reg2.href = this._panelLink;
            if (this._panelLinkTarget == "") 
            {
                __reg2.target = "_self";
            }
            else 
            {
                __reg2.target = this._panelLinkTarget;
            }
        }
        else 
        {
            __reg2 = null;
        }
        return __reg2;
    }

    function get strokeInfo()
    {
        var __reg2 = new Object();
        __reg2 = this._panelStroke;
        return __reg2;
    }

    function get transitionDelay()
    {
        return this._panelDelay;
    }

    function get panelModelData()
    {
        var __reg2 = new Object();
        var __reg3 = new Object();
        __reg3 = this._panelTabConfig;
        __reg2.tabConfig = __reg3;
        return __reg2;
    }

    function get panelAssetExtension()
    {
        return this._panelAssetExtension;
    }

}
